PreviousNextTracker indexSee it online !

(253/314) 3615216 - PHPParser - method call without variable

When I try to instantiate some class and call its method immediatelly without variable using then PHPParser marks it as invalid code but it is working well.
My source code is:

--------------------- begin code --------------------
class Index{

public function run(){
return true;
}
}

(new Index())->run();
--------------------- end code --------------------

There is "';' expected" error message in the error list.

jEdit version 5.0.0
PHPParser 2.0.1
Gentoo linux

Submitted enca - 2013-11-16 - 21:04:15z Assigned nobody
Priority 5 Category None
Status Open Group None
Resolution None Visibility No

Comments

Attachments